package com.ruoyi.yipaiju.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yipaiju.mapper.DiscountHouseMapper;
import com.ruoyi.yipaiju.domain.DiscountHouse;
import com.ruoyi.yipaiju.service.IDiscountHouseService;

/**
 * fo_discount_houseService业务层处理
 * 
 * @author liuwp
 * @date 2023-03-01
 */
@Service
public class DiscountHouseServiceImpl implements IDiscountHouseService 
{
    @Autowired
    private DiscountHouseMapper discountHouseMapper;

    /**
     * 查询fo_discount_house
     * 
     * @param id fo_discount_house主键
     * @return fo_discount_house
     */
    @Override
    public DiscountHouse selectDiscountHouseById(Long id)
    {
        return discountHouseMapper.selectDiscountHouseById(id);
    }

    /**
     * 查询fo_discount_house列表
     * 
     * @param discountHouse fo_discount_house
     * @return fo_discount_house
     */
    @Override
    public List<DiscountHouse> selectDiscountHouseList(DiscountHouse discountHouse)
    {
        return discountHouseMapper.selectDiscountHouseList(discountHouse);
    }

    /**
     * 根据业务主键查询一条记录：fo_discount_house
     *
     * @param discountHouse fo_discount_house
     * @return fo_discount_house
     */
    @Override
    public DiscountHouse selectOneDiscountHouse(DiscountHouse discountHouse)
    {
        return discountHouseMapper.selectOneDiscountHouse(discountHouse);
    }

    /**
     * 新增fo_discount_house
     * 
     * @param discountHouse fo_discount_house
     * @return 结果
     */
    @Override
    public int insertDiscountHouse(DiscountHouse discountHouse)
    {
        return discountHouseMapper.insertDiscountHouse(discountHouse);
    }

    /**
     * 修改fo_discount_house
     * 
     * @param discountHouse fo_discount_house
     * @return 结果
     */
    @Override
    public int updateDiscountHouse(DiscountHouse discountHouse)
    {
        discountHouse.setUpdateTime(DateUtils.getNowDate());
        return discountHouseMapper.updateDiscountHouse(discountHouse);
    }

    @Override
    public int updateDiscountHouseCondition(DiscountHouse discountHouse, DiscountHouse discountHouseCondition)
    {
                discountHouse.setUpdateTime(DateUtils.getNowDate());
        return discountHouseMapper.updateDiscountHouseCondition(discountHouse, discountHouseCondition);
    }

    /**
     * 批量删除fo_discount_house
     * 
     * @param ids 需要删除的fo_discount_house主键
     * @return 结果
     */
    @Override
    public int deleteDiscountHouseByIds(Long[] ids)
    {
        return discountHouseMapper.deleteDiscountHouseByIds(ids);
    }

    /**
     * 删除fo_discount_house信息
     * 
     * @param id fo_discount_house主键
     * @return 结果
     */
    @Override
    public int deleteDiscountHouseById(Long id)
    {
        return discountHouseMapper.deleteDiscountHouseById(id);
    }

    /**
     * 条件删除fo_discount_house
     *
     * @param discountHouse fo_discount_house
     * @return 结果
     */
    @Override
    public int deleteDiscountHouseByCondition(DiscountHouse discountHouse)
    {
        return discountHouseMapper.deleteDiscountHouseByCondition(discountHouse);
    }

}
